package cn.edu.bupt.ch6_2.service.impl;

import cn.edu.bupt.ch6_2.entity.Comment;
import cn.edu.bupt.ch6_2.mapper.CommentMapper;
import cn.edu.bupt.ch6_2.service.ICommentService;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CommentServiceImpl  implements ICommentService {
    @Resource
    private CommentMapper commentMapper;

    @Override
    public List<Comment> findByProdId(Long prodId) {
        return commentMapper.findByProdId(prodId);
    }

    @Override
    public int create(Comment comment) {
        return commentMapper.create(comment);
    }
}
